package com.itheima.controller;

import com.itheima.common.entity.Result;
import com.itheima.service.ValidateCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ValidateCode")
public class ValidateCodeController {

    @Autowired
    private ValidateCodeService validateCodeService;

    /**
     * 快速发送登录验证码
     * @param telephone
     * @return
     */
    @GetMapping("/send4Login")
    public Result ValidateCode(String telephone){
        return validateCodeService.ValidateCode(telephone);
    }

}
